{
 "cells": [
  {
   "cell_type": "code",
   "id": "initial_id",
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2025-09-26T08:48:48.691291Z",
     "start_time": "2025-09-26T08:48:48.686035Z"
    }
   },
   "source": [
    "import data\n",
    "import numpy as np\n",
    "arr1d = np.array([1,2,3])\n"
   ],
   "outputs": [],
   "execution_count": 9
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-26T08:48:48.726203Z",
     "start_time": "2025-09-26T08:48:48.720764Z"
    }
   },
   "cell_type": "code",
   "source": [
    "import numpy as np\n",
    "arr2d = np.array([[1,2,3],[4,5,6]])"
   ],
   "id": "4ce0c6d4174b129b",
   "outputs": [],
   "execution_count": 10
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-26T12:39:43.494701Z",
     "start_time": "2025-09-26T12:39:43.227778Z"
    }
   },
   "cell_type": "code",
   "source": [
    "import numpy as np\n",
    "arr3d = np.array([[1,2,3],[4,5,6],[7,8,9]])"
   ],
   "id": "ddccb8ef5462c3da",
   "outputs": [],
   "execution_count": 40
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-26T08:49:16.294104Z",
     "start_time": "2025-09-26T08:49:16.290590Z"
    }
   },
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": "",
   "id": "4de484ad0c2aa72d"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-26T12:39:47.165462Z",
     "start_time": "2025-09-26T12:39:47.145596Z"
    }
   },
   "cell_type": "code",
   "source": [
    "data =np.array([[1,2,3],[4,5,6]])\n",
    "float_data= data.astype(np.float32)\n",
    "float_data.dtype.name"
   ],
   "id": "7228841db2efcdbc",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'float32'"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 41
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-26T12:39:48.993818Z",
     "start_time": "2025-09-26T12:39:48.982573Z"
    }
   },
   "cell_type": "code",
   "source": [
    "float_data=np.array([1.2,2.9,3.5])\n",
    "int_data=data.astype(np.int32)\n",
    "int_data"
   ],
   "id": "befdccfe8e854d3e",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1, 2, 3],\n",
       "       [4, 5, 6]], dtype=int32)"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 42
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-26T12:42:38.438344Z",
     "start_time": "2025-09-26T12:42:38.427863Z"
    }
   },
   "cell_type": "code",
   "source": [
    "str_data=np.array(['1','2','3'])\n",
    "int_data=str_data.astype(np.int64)\n",
    "int_data"
   ],
   "id": "aef55833d25233b6",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2, 3])"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 43
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
